<extend name="Base/common"/>

<block name="side">

</block>
<block name="body">
    <php>
        query_user(array('avatar128','username','uid'));
    </php>
    <div class="col-xs-12">
        <div class="row">
            <div class="col-xs-9 weibo_main" style="margin-top: 10px">
                <div class="row">
                    <if condition="is_login()">
                        <div class="hot_post" style="margin-top: 0;padding-bottom: 10px">
                            <div class="row">
                                <div class="col-xs-2">
                                    <script>
                                        $(function () {
                                            $inputor = $('#weibo_content').atwho(atwho_config);
                                        })

                                    </script>
                                    <php>
                                        $weibo['user']['space_url'] = U('UserCenter/Index/index',
                                        array('uid'=>$weibo['user']['uid']));
                                    </php>
                                    <a href="{$weibo.user.space_url}">
                                        <img src="{$weibo.user.avatar128}" class="avatar-img"/>
                                    </a>
                                </div>

                                <div class="col-xs-6">
                                    <a style="font-size: 1.2em;width: 100%" title="{$weibo.user.username}"
                                       class="text-more"
                                       href="{$weibo.user.space_url}">{$weibo.user.username}</a>&nbsp;{$weibo.user.icons_html}
                                    <br/>头衔：
                                    <if condition="$weibo['user']['rank_link'][0]['num']">
                                        <volist name="weibo['user']['rank_link']" id="vl">
                                            <if condition="$vl['is_show']">
                                                <img src="{$vl.logo_url}" title="{$vl.title}" alt="{$vl.title}"
                                                     style="width: 18px;height: 18px;vertical-align: middle;margin-left: 2px;"/>
                                            </if>
                                        </volist>
                                        <else/>
                                        无
                                    </if>
                                    <br/>积分：{$weibo.user.score}
                                    <br/>等级：{$weibo.user.title|op_t}
                                </div>


                                <div class="col-xs-4 row">
                                    <div style="margin: 10px;text-align: center">
                                        <div class="col-xs-4">
                                            微博<br/>{$weibo.user.weibocount}
                                        </div>
                                        <div class="col-xs-4">
                                            粉丝<br/>{$weibo.user.fans}
                                        </div>
                                        <div class="col-xs-4">
                                            关注<br/>{$weibo.user.following}
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </if>
                </div>

                <div class="row">
                    <div class="col-xs-12" style="padding-top: 10px">
                        <p>
                            <img src="__IMG__/ad.png" style="width: 100%;"/>
                        </p>
                    </div>
                </div>
                <hr>
                <div id="weibo_list">
                    <div class="row" id="weibo_{$weibo.id}">
                        <div class="col-xs-12">
                            <div style="padding-left: 16px;">
                                <p>{$weibo.content|parse_weibo_content}</p>

                                <div>

                                    <span class="text-primary">{$weibo.create_time|friendlyDate}</span>

                                    <div class="pull-right operation" style="margin-bottom: .5em">
                                        <php>
                                            $weiboCommentTotalCount = $weibo['comment_count'];
                                        </php>
                                        <include file="_operation"/>
                                    </div>
                                </div>

                                <div class="row weibo-comment-list" style="display: none;"
                                     data-weibo-id="{$weibo.id}">
                                    <div class="col-xs-12">
                                        <div class="light-jumbotron" style="padding: 1em 2em;">
                                            <div class="weibo-comment-container">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-3">

                <div>
                    {:hook('Rank')}

                    {:W('UserList/lists',array('forum_id'=>$forum_id))}
                </div>
            </div>

        </div>
    </div>
</block>

<block name="script">
    <script type="text/javascript" src="__STATIC__/oneplus/js/ext/atwho/atwho.js"></script>
    <link type="text/css" rel="stylesheet" href="__STATIC__/oneplus/js/ext/atwho//atwho.css"/>
    <script src="__JS__/insertFace.js"></script>
    <script src="__JS__/weibo.js"></script>
    <script src="__JS__/insertFace.js"></script>
    <script>
        var auto_open_detail = 1;
        $(function () {
            var noMoreNextPage = false;
            var isLoadingWeibo = false;
            var currentPage = 1;
        })
    </script>
</block>
